***Masuoka, Grose and Junn "Sexual Harassment and Candidate Evaluation" Replication code; August 2021
***Replication file for Study 2 presented in Appendix
***Subjects only Democratic or Republican respondents (pid7==1,2,6,7)
***new variables: trudem==1 if pid7 is 6 or 7; 0=otherwise; truegop==1 if pid7 is 1 or 2; 0=otherwise

*Table 1, candidate means, experiment 2 (MTurk)
*Dem. candidate
mean post_vote if matt_dem_cand==1&treatment==1&truedem==1|matt_dem_cand==1&treatment==1&truegop==1
mean post_vote if matt_dem_cand==1&control==1&truedem==1|matt_dem_cand==1&control==1&truegop==1

*GOP candidate, experiment 2
mean post_vote if matt_gop_cand==1&treatment==1&truedem==1|matt_gop_cand==1&treatment==1&truegop==1
mean post_vote if matt_gop_cand==1&control==1&truedem==1|matt_gop_cand==1&control==1&truegop==1

*Generate experimental condition measures (expergroup=1 if treatment; =2 if placebo; =3 if control)
gen expergroup=1 if treatment==1
recode expergroup (.=2) if placebo==1
recode expergroup (.=3) if control==1

*Generate four party-gender groups
gen PGgroup=1 if truedem==1&female==1
recode PGgroup (.=2) if truedem==1&female==0
recode PGgroup (.=3) if truegop==1&female==1
recode PGgroup (.=4) if truegop==1&female==0

*by party-gender group, harassment treatment, experiment 2
mean post_vote if treatment==1&truedem==1&female==1
mean post_vote if treatment==1&truedem==1&female==0
mean post_vote if treatment==1&truegop==1&female==1
mean post_vote if treatment==1&truegop==1&female==0

*by party-gender group, control, experiment 2
mean post_vote if control==1&truedem==1&female==1
mean post_vote if control==1&truedem==1&female==0
mean post_vote if control==1&truegop==1&female==1
mean post_vote if control==1&truegop==1&female==0

*by party-gender group by candidate party (D or R), harassment treatment only, experiment 2
mean post_vote if treatment==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_dem_cand==1
mean post_vote if treatment==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_gop_cand==1

*by party-gender group by candidate party (D or R), control only, experiment 2
mean post_vote if control==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_gop_cand==1

*by party-gender group by treatment/control, Democratic candidate, experiment 2
mean post_vote if treatment==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_dem_cand==1

*by party-gender group by treatment/control, Republican candidate, experiment 2
mean post_vote if treatment==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_gop_cand==1
mean post_vote if control==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_gop_cand==1

*treatment vs. placebo, Dem. candidate
mean post_vote if treatment==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_dem_cand==1
mean post_vote if placebo==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if placebo==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if placebo==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if placebo==1&truegop==1&female==0&matt_dem_cand==1

*treatment vs. placebo, Dem. candidate
mean post_vote if treatment==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_gop_cand==1
mean post_vote if placebo==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if placebo==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if placebo==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if placebo==1&truegop==1&female==0&matt_gop_cand==1

*placebo vs. control, Dem. candidate
mean post_vote if placebo==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if placebo==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if placebo==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if placebo==1&truegop==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_dem_cand==1

*placebo vs. control, Dem. candidate
mean post_vote if placebo==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if placebo==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if placebo==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if placebo==1&truegop==1&female==0&matt_gop_cand==1
mean post_vote if control==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_gop_cand==

*Comparing harassment treatment & control when voter shares candidate party, by voter group, experiment 2

mean post_vote if treatment==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_gop_cand==1

mean post_vote if control==1&truedem==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_gop_cand==1

*Comparing harassment treatment & control when voter opposite candidate party, by voter group, experiment 2

mean post_vote if treatment==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if treatment==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if treatment==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if treatment==1&truegop==1&female==0&matt_dem_cand==1

mean post_vote if control==1&truedem==1&female==1&matt_gop_cand==1
mean post_vote if control==1&truedem==1&female==0&matt_gop_cand==1
mean post_vote if control==1&truegop==1&female==1&matt_dem_cand==1
mean post_vote if control==1&truegop==1&female==0&matt_dem_cand==1

Diff-in-diff stat. tests
gen treat_x_female=treatment*female
reg post_vote treatment female treat_x_female if treatment==1&truedem==1& matt_dem_cand ==1|control==1&truedem==1& matt_dem_cand==1
reg post_vote treatment female treat_x_female if treatment==1&truegop==1& matt_gop_cand ==1|control==1&truegop==1& matt_gop_cand==1
reg post_vote treatment female treat_x_female if treatment==1&truegop==1& matt_gop_cand ==1&female==1|control==1&truegop==1& matt_gop_cand==1

gen demfemale=1 if female==1&truedem==1
recode demfemale (.=0)

gen demmale=1 if female==0&truedem==1
recode demmale (.=0)

gen gopfemale=1 if female==1&truegop==1
recode gopfemale (.=0)

gen gopmale=1 if female==0&truegop==1
recode gopmale (.=0)

gen treat_x_demfemale=treatment*demfemale
gen treat_x_demmale=treatment*demmale
gen treat_x_gopfemale=treatment*gopfemale
gen treat_x_gopmale=treatment*gopmale

gen samepartycand=1 if truedem==1&matt_dem_cand==1
recode samepartycand (.=1) if truegop==1&matt_gop_cand==1
recode samepartycand (.=0) if truegop==1&matt_dem_cand==1
recode samepartycand (.=0) if truedem==1&matt_gop_cand==1

*Diff in means
ttest post_vote if treatment==1&demfemale==1& samepartycand==1|control==1&demfemale==1& samepartycand==1, by(treatment)
ttest post_vote if treatment==1&demmale==1& samepartycand==1|control==1&demmale==1& samepartycand==1, by(treatment)
ttest post_vote if treatment==1&gopfemale==1& samepartycand==1|control==1&gopfemale==1& samepartycand==1, by(treatment)
ttest post_vote if treatment==1&gopmale==1& samepartycand==1|control==1&gopmale==1& samepartycand==1, by(treatment)

*Testing for diff-in-diffs (interaction term)
reg post_vote treatment demfemale treat_x_demfemale if treatment==1& samepartycand==1&demfemale==1|control==1& samepartycand==1&demfemale==1|treatment==1& samepartycand==1&demmale==1|control==1& samepartycand==1&demmale==1
reg post_vote treatment demfemale treat_x_demfemale if treatment==1& samepartycand==1&demfemale==1|control==1& samepartycand==1&demfemale==1|treatment==1& samepartycand==1&gopfemale==1|control==1& samepartycand==1&gopfemale==1
reg post_vote treatment demfemale treat_x_demfemale if treatment==1& samepartycand==1&demfemale==1|control==1& samepartycand==1&demfemale==1|treatment==1& samepartycand==1&gopmale==1|control==1& samepartycand==1&gopmale==1

reg post_vote treatment demmale treat_x_demmale if treatment==1& samepartycand==1&demmale==1|control==1& samepartycand==1&demmale==1|treatment==1& samepartycand==1&gopfemale==1|control==1& samepartycand==1&gopfemale==1
reg post_vote treatment demmale treat_x_demmale if treatment==1& samepartycand==1&demmale==1|control==1& samepartycand==1&demmale==1|treatment==1& samepartycand==1&gopmale==1|control==1& samepartycand==1&gopmale==1

reg post_vote treatment gopmale treat_x_gopmale if treatment==1& samepartycand==1&gopmale==1|control==1& samepartycand==1&gopmale==1|treatment==1& samepartycand==1&gopfemale==1|control==1& samepartycand==1&gopfemale==1

*Diff in means
ttest post_vote if treatment==1&demfemale==1& samepartycand==0|control==1&demfemale==1& samepartycand==0, by(treatment)
ttest post_vote if treatment==1&demmale==1& samepartycand==0|control==1&demmale==1& samepartycand==0, by(treatment)
ttest post_vote if treatment==1&gopfemale==1& samepartycand==0|control==1&gopfemale==1& samepartycand==0, by(treatment)
ttest post_vote if treatment==1&gopmale==1& samepartycand==0|control==1&gopmale==1& samepartycand==0, by(treatment)

*Testing for diff-in-diffs (interaction term)
reg post_vote treatment demfemale treat_x_demfemale if treatment==1& samepartycand==0&demfemale==1|control==1& samepartycand==0&demfemale==1|treatment==1& samepartycand==0&demmale==1|control==1& samepartycand==0&demmale==1
reg post_vote treatment demfemale treat_x_demfemale if treatment==1& samepartycand==0&demfemale==1|control==1& samepartycand==0&demfemale==1|treatment==1& samepartycand==0&gopfemale==1|control==1& samepartycand==0&gopfemale==1
reg post_vote treatment demfemale treat_x_demfemale if treatment==1& samepartycand==0&demfemale==1|control==1& samepartycand==0&demfemale==1|treatment==1& samepartycand==0&gopmale==1|control==1& samepartycand==0&gopmale==1

reg post_vote treatment demmale treat_x_demmale if treatment==1& samepartycand==0&demmale==1|control==1& samepartycand==0&demmale==1|treatment==1& samepartycand==0&gopfemale==1|control==1& samepartycand==0&gopfemale==1
reg post_vote treatment demmale treat_x_demmale if treatment==1& samepartycand==0&demmale==1|control==1& samepartycand==0&demmale==1|treatment==1& samepartycand==0&gopmale==1|control==1& samepartycand==0&gopmale==1

reg post_vote treatment gopmale treat_x_gopmale if treatment==1& samepartycand==0&gopmale==1|control==1& samepartycand==0&gopmale==1|treatment==1& samepartycand==0&gopfemale==1|control==1& samepartycand==0&gopfemale==1


*Appendix C, appendices for Experiment 2/MTurk
*Balance table
mean age if truedem==1&matt_dem_cand ==1|truegop==1&matt_dem_cand==1
mean age if truedem==1&matt_gop_cand ==1|truegop==1&matt_gop_cand ==1
mean age if truedem==1&matt_noparty_cand==1|truegop==1&matt_noparty_cand==1

mean age if truedem==1&control==1|truegop==1&control==1
mean age if truedem==1&placebo==1|truegop==1&placebo==1
mean age if truedem==1&treatment==1|truegop==1&treatment==1

tab education
gen education_numeric=5 if education=="Post-graduate education"
recode education_numeric (.=4) if education=="4-year college graduate"
recode education_numeric (.=3) if education=="Some college, 2-year degree"
recode education_numeric (.=2) if education=="High School graduate or GED"
recode education_numeric (.=1) if education=="Some High School"

mean education_numeric if truedem==1&matt_dem_cand ==1|truegop==1&matt_dem_cand==1
mean education_numeric if truedem==1&matt_gop_cand ==1|truegop==1&matt_gop_cand ==1
mean education_numeric if truedem==1&matt_noparty_cand==1|truegop==1&matt_noparty_cand==1

mean education_numeric if truedem==1&control==1|truegop==1&control==1
mean education_numeric if truedem==1&placebo==1|truegop==1&placebo==1
mean education_numeric if truedem==1&treatment==1|truegop==1&treatment==1

tab income
gen income_numeric=1 if income=="Less than $20,000"
recode income_numeric (.=2) if income=="$20,000 to $29,999"
recode income_numeric (.=3) if income=="$30,000 to $39,999"
recode income_numeric (.=4) if income=="$40,000 to $49,999"
recode income_numeric (.=5) if income=="$50,000 to $59,999"
recode income_numeric (.=6) if income=="$60,000 to $69,999"
recode income_numeric (.=7) if income=="$70,000 to $79,999"
recode income_numeric (.=8) if income=="$80,000 to $89,999"
recode income_numeric (.=9) if income=="$90,000 to $99,999"
recode income_numeric (.=10) if income=="$100,000 to $149,999"
recode income_numeric (.=11) if income=="$150,000 to $199,999"
recode income_numeric (.=12) if income=="$200,000 or more"

mean income_numeric if truedem==1&matt_dem_cand ==1|truegop==1&matt_dem_cand==1
mean income_numeric if truedem==1&matt_gop_cand ==1|truegop==1&matt_gop_cand ==1
mean income_numeric if truedem==1&matt_noparty_cand==1|truegop==1&matt_noparty_cand==1

mean income_numeric if truedem==1&control==1|truegop==1&control==1
mean income_numeric if truedem==1&placebo==1|truegop==1&placebo==1
mean income_numeric if truedem==1&treatment==1|truegop==1&treatment==1

mean female if truedem==1&matt_dem_cand ==1|truegop==1&matt_dem_cand==1
mean female if truedem==1&matt_gop_cand ==1|truegop==1&matt_gop_cand ==1
mean female if truedem==1&matt_noparty_cand==1|truegop==1&matt_noparty_cand==1

mean female if truedem==1&control==1|truegop==1&control==1
mean female if truedem==1&placebo==1|truegop==1&placebo==1
mean female if truedem==1&treatment==1|truegop==1&treatment==1

mean whiteonly if truedem==1&matt_dem_cand ==1|truegop==1&matt_dem_cand==1
mean whiteonly if truedem==1&matt_gop_cand ==1|truegop==1&matt_gop_cand ==1
mean whiteonly if truedem==1&matt_noparty_cand==1|truegop==1&matt_noparty_cand==1

mean whiteonly if truedem==1&control==1|truegop==1&control==1
mean whiteonly if truedem==1&placebo==1|truegop==1&placebo==1
mean whiteonly if truedem==1&treatment==1|truegop==1&treatment==1

mean truedem if truedem==1&matt_dem_cand ==1|truegop==1&matt_dem_cand==1
mean truedem if truedem==1&matt_gop_cand ==1|truegop==1&matt_gop_cand ==1
mean truedem if truedem==1&matt_noparty_cand==1|truegop==1&matt_noparty_cand==1

mean truedem if truedem==1&control==1|truegop==1&control==1
mean truedem if truedem==1&placebo==1|truegop==1&placebo==1
mean truedem if truedem==1&treatment==1|truegop==1&treatment==1

mean post_vote if matt_dem_cand==1&treatment==1
mean post_vote if matt_dem_cand==1&control==1

mean post_vote if matt_gop_cand==1&treatment==1
mean post_vote if matt_gop_cand==1&control==1

mean post_vote if matt_noparty_cand==1&treatment==1
mean post_vote if matt_noparty_cand==1&control==1

ttest post_vote if matt_dem_cand==1&treatment==1|matt_dem_cand==1&control==1, by(treatment)
ttest post_vote if matt_gop_cand==1&treatment==1|matt_gop_cand==1&control==1, by(treatment)
ttest post_vote if matt_noparty_cand==1&treatment==1|matt_noparty_cand==1&control==1, by(treatment)
*Note: above is also used for Table C2 in Appendix C


*Tukey tests 
anova treatment post_vote if matt_dem_cand==1&treatment==1|matt_dem_cand==1&control==1
tukeyhsd treatment if matt_dem_cand==1&treatment==1|matt_dem_cand==1&control==1 

anova treatment post_vote if matt_gop_cand==1&treatment==1|matt_dem_cand==1&control==1
tukeyhsd treatment if matt_gop_cand==1&treatment==1|matt_gop_cand==1&control==1

anova treatment post_vote if matt_noparty_cand==1&treatment==1|matt_dem_cand==1&control==1
tukeyhsd treatment if matt_noparty_cand==1&treatment==1|matt_noparty_cand==1&control==1

*Experiment 2 
mean post_vote if treatment==1&demfemale==1
mean post_vote if treatment==1&demmale==1
mean post_vote if treatment==1&gopfemale==1
mean post_vote if treatment==1&gopmale==1

mean post_vote if control==1&demfemale==1
mean post_vote if control==1&demmale==1
mean post_vote if control==1&gopfemale==1
mean post_vote if control==1&gopmale==1

ttest post_vote if treatment==1&demfemale==1|control==1&demfemale==1, by(treatment)
ttest post_vote if treatment==1&demmale==1|control==1&demmale==1, by(treatment)
ttest post_vote if treatment==1&gopfemale==1|control==1&gopfemale==1, by(treatment)
ttest post_vote if treatment==1&gopmale==1|control==1&gopmale==1, by(treatment)

*Tukey statistical test
anova post_vote treatment if treatment==1&demfemale==1|control==1&demfemale==1
tukeyhsd treatment if treatment==1&demfemale==1|control==1&demfemale==1
anova post_vote treatment if treatment==1&demmale==1|control==1&demmale==1
tukeyhsd treatment if treatment==1&demmale==1|control==1&demmale==1
anova post_vote treatment if treatment==1&gopfemale==1|control==1&gopfemale==1
tukeyhsd treatment if treatment==1&gopfemale==1|control==1&gopfemale==1
anova post_vote treatment if treatment==1&gopmale==1|control==1&gopmale==1
tukeyhsd treatment if treatment==1&gopmale==1|control==1&gopmale==1

reg post_vote treatment demfemale treat_x_demfemale if treatment==1&demfemale==1|control==1&demfemale==1|treatment==1&gopmale==1|control==1&gopmale==1
reg post_vote treatment demfemale treat_x_demfemale if treatment==1&demfemale==1|control==1&demfemale==1|treatment==1&gopfemale==1|control==1&gopfemale==1
reg post_vote treatment demfemale treat_x_demfemale if treatment==1&demfemale==1|control==1&demfemale==1|treatment==1&demmale==1|control==1&demmale==1

reg post_vote treatment demmale treat_x_demmale if treatment==1&demmale==1|control==1&demmale==1|treatment==1&gopmale==1|control==1&gopmale==1
reg post_vote treatment demmale treat_x_demmale if treatment==1&demmale==1|control==1&demmale==1|treatment==1&gopfemale==1|control==1&gopfemale==1

reg post_vote treatment gopmale treat_x_gopmale if treatment==1&gopmale==1|control==1&gopmale==1|treatment==1&gopfemale==1|control==1&gopfemale==1


mean post_vote if placebo==1&samepartycand==1&demfemale==1
mean post_vote if placebo==1&samepartycand==1&demmale==1
mean post_vote if placebo==1&samepartycand==1&gopfemale==1
mean post_vote if placebo==1&samepartycand==1&gopmale==1

mean post_vote if control==1&samepartycand==1&demfemale==1
mean post_vote if control==1&samepartycand==1&demmale==1
mean post_vote if control==1&samepartycand==1&gopfemale==1
mean post_vote if control==1&samepartycand==1&gopmale==1

mean post_vote if treatment==1&samepartycand==1&demfemale==1
mean post_vote if treatment==1&samepartycand==1&demmale==1
mean post_vote if treatment==1&samepartycand==1&gopfemale==1
mean post_vote if treatment==1&samepartycand==1&gopmale==1

*Placebo versus control t-tests (though this test not displayed in tables; but used for the diff in means on the same scale)
ttest post_vote if placebo==1&demfemale==1&sameparty==1|control==1&demfemale==1&sameparty==1, by(placebo)
ttest post_vote if placebo==1&demmale==1&sameparty==1|control==1&demmale==1&sameparty==1, by(placebo)
ttest post_vote if placebo==1&gopfemale==1&sameparty==1|control==1&gopfemale==1&sameparty==1, by(placebo)
ttest post_vote if placebo==1&gopmale==1&sameparty==1|control==1&gopmale==1&sameparty==1, by(placebo)

*Tukey test
anova post_vote placebo if placebo==1&demfemale==1&sameparty==1|control==1&demfemale==1&sameparty==1
tukeyhsd placebo if placebo==1&demfemale==1&sameparty==1|control==1&demfemale==1&sameparty==1
anova post_vote placebo if placebo==1&demmale==1&sameparty==1|control==1&demmale==1&sameparty==1
tukeyhsd placebo if placebo==1&demmale==1&sameparty==1|control==1&demmale==1&sameparty==1
anova post_vote placebo if placebo==1&gopfemale==1&sameparty==1|control==1&gopfemale==1&sameparty==1
tukeyhsd placebo if placebo==1&gopfemale==1&sameparty==1|control==1&gopfemale==1&sameparty==1
anova post_vote placebo if placebo==1&gopmale==1&sameparty==1|control==1&gopmale==1&sameparty==1
tukeyhsd placebo if placebo==1&gopmale==1&sameparty==1|control==1&gopmale==1&sameparty==1

*Placebo versus treatment t-tests (though this test not displayed in tables; but used for the diff in means on the same scale)
ttest post_vote if placebo==1&demfemale==1&sameparty==1|treatment==1&demfemale==1&sameparty==1, by(placebo)
ttest post_vote if placebo==1&demmale==1&sameparty==1|treatment==1&demmale==1&sameparty==1, by(placebo)
ttest post_vote if placebo==1&gopfemale==1&sameparty==1|treatment==1&gopfemale==1&sameparty==1, by(placebo)
ttest post_vote if placebo==1&gopmale==1&sameparty==1|treatment==1&gopmale==1&sameparty==1, by(placebo)

*Tukey test
anova post_vote placebo if placebo==1&demfemale==1&sameparty==1|treatment==1&demfemale==1&sameparty==1
tukeyhsd placebo if placebo==1&demfemale==1&sameparty==1|treatment==1&demfemale==1&sameparty==1
anova post_vote placebo if placebo==1&demmale==1&sameparty==1|treatment==1&demmale==1&sameparty==1
tukeyhsd placebo if placebo==1&demmale==1&sameparty==1|treatment==1&demmale==1&sameparty==1
anova post_vote placebo if placebo==1&gopfemale==1&sameparty==1|treatment==1&gopfemale==1&sameparty==1
tukeyhsd placebo if placebo==1&gopfemale==1&sameparty==1|treatment==1&gopfemale==1&sameparty==1
anova post_vote placebo if placebo==1&gopmale==1&sameparty==1|treatment==1&gopmale==1&sameparty==1
tukeyhsd placebo if placebo==1&gopmale==1&sameparty==1|treatment==1&gopmale==1&sameparty==1

*control condition only
mean post_vote if matt_dem_cand==1&control==1&demfemale==1
mean post_vote if matt_dem_cand==1&control==1&demmale==1
mean post_vote if matt_dem_cand==1&control==1&gopfemale==1
mean post_vote if matt_dem_cand==1&control==1&gopmale==1

mean post_vote if matt_gop_cand==1&control==1&demfemale==1
mean post_vote if matt_gop_cand==1&control==1&demmale==1
mean post_vote if matt_gop_cand==1&control==1&gopfemale==1
mean post_vote if matt_gop_cand==1&control==1&gopmale==1

anova post_vote matt_dem_cand if control==1&matt_dem_cand==1&demfemale==1|control==1&matt_gop_cand==1&demfemale==1
tukeyhsd matt_dem_cand if control==1&matt_dem_cand==1&demfemale==1|control==1&matt_gop_cand==1&demfemale==1
anova post_vote matt_dem_cand if control==1&matt_dem_cand==1&demmale==1|control==1&matt_gop_cand==1&demmale==1
tukeyhsd matt_dem_cand if control==1&matt_dem_cand==1&demmale==1|control==1&matt_gop_cand==1&demmale==1
anova post_vote matt_dem_cand if control==1&matt_dem_cand==1&gopfemale==1|control==1&matt_gop_cand==1&gopfemale==1
tukeyhsd matt_dem_cand if control==1&matt_dem_cand==1&gopfemale==1|control==1&matt_gop_cand==1&gopfemale==1
anova post_vote matt_dem_cand if control==1&matt_dem_cand==1&gopmale==1|control==1&matt_gop_cand==1&gopmale==1
tukeyhsd matt_dem_cand if control==1&matt_dem_cand==1&gopmale==1|control==1&matt_gop_cand==1&gopmale==1

gen matt_dem_cand_x_demfemale=matt_dem_cand*demfemale
reg post_vote matt_dem_cand demfemale matt_dem_cand_x_demfemale if control==1&matt_dem_cand==1&demfemale==1|control==1&matt_gop_cand==1&demfemale==1|control==1&matt_dem_cand==1&gopmale==1|control==1&matt_gop_cand==1&gopmale==1
reg post_vote matt_dem_cand demfemale matt_dem_cand_x_demfemale if control==1&matt_dem_cand==1&demfemale==1|control==1&matt_gop_cand==1&demfemale==1|control==1&matt_dem_cand==1&gopfemale==1|control==1&matt_gop_cand==1&gopfemale==1
reg post_vote matt_dem_cand demfemale matt_dem_cand_x_demfemale if control==1&matt_dem_cand==1&demfemale==1|control==1&matt_gop_cand==1&demfemale==1|control==1&matt_dem_cand==1&demmale==1|control==1&matt_gop_cand==1&demmale==1

gen matt_dem_cand_x_demmale=matt_dem_cand*demmale
reg post_vote matt_dem_cand demmale matt_dem_cand_x_demmale if control==1&matt_dem_cand==1&demmale==1|control==1&matt_gop_cand==1&demmale==1|control==1&matt_dem_cand==1&gopmale==1|control==1&matt_gop_cand==1&gopmale==1
reg post_vote matt_dem_cand demmale matt_dem_cand_x_demmale if control==1&matt_dem_cand==1&demmale==1|control==1&matt_gop_cand==1&demmale==1|control==1&matt_dem_cand==1&gopfemale==1|control==1&matt_gop_cand==1&gopfemale==1

gen matt_dem_cand_x_gopfemale=matt_dem_cand*gopfemale
reg post_vote matt_dem_cand gopfemale matt_dem_cand_x_gopfemale if control==1&matt_dem_cand==1&gopfemale==1|control==1&matt_gop_cand==1&gopfemale==1|control==1&matt_dem_cand==1&gopmale==1|control==1&matt_gop_cand==1&gopmale==1

*Differences in post-treatment evaluation and pre-treatment evaluation vote likelihood scores on same party candidate, experiment 2
tab post_vote
tab pre_vote
gen post_vote_minus_pre_vote=post_vote-pre_vote

mean post_vote_minus_pre_vote if treatment==1&samepartycand==1&demfemale==1
mean post_vote_minus_pre_vote if treatment==1&samepartycand==1&demmale==1
mean post_vote_minus_pre_vote if treatment==1&samepartycand==1&gopfemale==1
mean post_vote_minus_pre_vote if treatment==1&samepartycand==1&gopmale==1

mean post_vote_minus_pre_vote if control==1&samepartycand==1&demfemale==1
mean post_vote_minus_pre_vote if control==1&samepartycand==1&demmale==1
mean post_vote_minus_pre_vote if control==1&samepartycand==1&gopfemale==1
mean post_vote_minus_pre_vote if control==1&samepartycand==1&gopmale==1
 
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==1&demfemale==1|treatment==1&samepartycand==1&demfemale==1
tukeyhsd treatment if control==1&samepartycand==1&demfemale==1|treatment==1&samepartycand==1&demfemale==1
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==1&demmale==1|treatment==1&samepartycand==1&demmale==1
tukeyhsd treatment if control==1&samepartycand==1&demmale==1|treatment==1&samepartycand==1&demmale==1
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==1&gopfemale==1|treatment==1&samepartycand==1&gopfemale==1
tukeyhsd treatment if control==1&samepartycand==1&gopfemale==1|treatment==1&samepartycand==1&gopfemale==1
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==1&gopmale==1|treatment==1&samepartycand==1&gopmale==1
tukeyhsd treatment if control==1&samepartycand==1&gopmale==1|treatment==1&samepartycand==1&gopmale==1

reg post_vote_minus_pre_vote treatment demfemale treat_x_demfemale if control==1&samepartycand==1&demfemale==1|treatment==1&samepartycand==1&demfemale==1|control==1&samepartycand==1&gopmale==1|treatment==1&samepartycand==1&gopmale==1
reg post_vote_minus_pre_vote treatment demfemale treat_x_demfemale if control==1&samepartycand==1&demfemale==1|treatment==1&samepartycand==1&demfemale==1|control==1&samepartycand==1&gopfemale==1|treatment==1&samepartycand==1&gopfemale==1
reg post_vote_minus_pre_vote treatment demfemale treat_x_demfemale if control==1&samepartycand==1&demfemale==1|treatment==1&samepartycand==1&demfemale==1|control==1&samepartycand==1&demmale==1|treatment==1&samepartycand==1&demmale==1

reg post_vote_minus_pre_vote treatment demmale treat_x_demmale if control==1&samepartycand==1&demmale==1|treatment==1&samepartycand==1&demmale==1|control==1&samepartycand==1&gopmale==1|treatment==1&samepartycand==1&gopmale==1
reg post_vote_minus_pre_vote treatment demmale treat_x_demmale if control==1&samepartycand==1&demmale==1|treatment==1&samepartycand==1&demmale==1|control==1&samepartycand==1&gopfemale==1|treatment==1&samepartycand==1&gopfemale==1

reg post_vote_minus_pre_vote treatment gopfemale treat_x_gopfemale if control==1&samepartycand==1&gopmale==1|treatment==1&samepartycand==1&gopmale==1|control==1&samepartycand==1&gopfemale==1|treatment==1&samepartycand==1&gopfemale==1

*Differences in post-treatment evaluation and pre-treatment evaluation vote likelihood scores on same party candidate, experiment 2
mean post_vote_minus_pre_vote if treatment==1&samepartycand==0&demfemale==1
mean post_vote_minus_pre_vote if treatment==1&samepartycand==0&demmale==1
mean post_vote_minus_pre_vote if treatment==1&samepartycand==0&gopfemale==1
mean post_vote_minus_pre_vote if treatment==1&samepartycand==0&gopmale==1

mean post_vote_minus_pre_vote if control==1&samepartycand==0&demfemale==1
mean post_vote_minus_pre_vote if control==1&samepartycand==0&demmale==1
mean post_vote_minus_pre_vote if control==1&samepartycand==0&gopfemale==1
mean post_vote_minus_pre_vote if control==1&samepartycand==0&gopmale==1
 
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==0&demfemale==1|treatment==1&samepartycand==0&demfemale==1
tukeyhsd treatment if control==1&samepartycand==0&demfemale==1|treatment==1&samepartycand==0&demfemale==1
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==0&demmale==1|treatment==1&samepartycand==0&demmale==1
tukeyhsd treatment if control==1&samepartycand==0&demmale==1|treatment==1&samepartycand==0&demmale==1
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==0&gopfemale==1|treatment==1&samepartycand==0&gopfemale==1
tukeyhsd treatment if control==1&samepartycand==0&gopfemale==1|treatment==1&samepartycand==0&gopfemale==1
anova post_vote_minus_pre_vote treatment if control==1&samepartycand==0&gopmale==1|treatment==1&samepartycand==0&gopmale==1
tukeyhsd treatment if control==1&samepartycand==0&gopmale==1|treatment==1&samepartycand==0&gopmale==1

reg post_vote_minus_pre_vote treatment demfemale treat_x_demfemale if control==1&samepartycand==0&demfemale==1|treatment==1&samepartycand==0&demfemale==1|control==1&samepartycand==0&gopmale==1|treatment==1&samepartycand==0&gopmale==1
reg post_vote_minus_pre_vote treatment demfemale treat_x_demfemale if control==1&samepartycand==0&demfemale==1|treatment==1&samepartycand==0&demfemale==1|control==1&samepartycand==0&gopfemale==1|treatment==1&samepartycand==0&gopfemale==1
reg post_vote_minus_pre_vote treatment demfemale treat_x_demfemale if control==1&samepartycand==0&demfemale==1|treatment==1&samepartycand==0&demfemale==1|control==1&samepartycand==0&demmale==1|treatment==1&samepartycand==0&demmale==1

reg post_vote_minus_pre_vote treatment demmale treat_x_demmale if control==1&samepartycand==0&demmale==1|treatment==1&samepartycand==0&demmale==1|control==1&samepartycand==0&gopmale==1|treatment==1&samepartycand==0&gopmale==1
reg post_vote_minus_pre_vote treatment demmale treat_x_demmale if control==1&samepartycand==0&demmale==1|treatment==1&samepartycand==0&demmale==1|control==1&samepartycand==0&gopfemale==1|treatment==1&samepartycand==0&gopfemale==1

reg post_vote_minus_pre_vote treatment gopfemale treat_x_gopfemale if control==1&samepartycand==0&gopmale==1|treatment==1&samepartycand==0&gopmale==1|control==1&samepartycand==0&gopfemale==1|treatment==1&samepartycand==0&gopfemale==1

*Experiment 2, Party ID variation for Harassment treatment only (replicates Table B5/exper. 1) 
mean post_vote if matt_dem_cand==1&demfemale==1&treatment==1
mean post_vote if matt_dem_cand==1&demmale==1&treatment==1
mean post_vote if matt_dem_cand==1&gopfemale==1&treatment==1
mean post_vote if matt_dem_cand==1&gopmale==1&treatment==1

mean post_vote if matt_gop_cand==1&demfemale==1&treatment==1
mean post_vote if matt_gop_cand==1&demmale==1&treatment==1
mean post_vote if matt_gop_cand==1&gopfemale==1&treatment==1
mean post_vote if matt_gop_cand==1&gopmale==1&treatment==1

anova post_vote matt_dem_cand if treatment==1&matt_dem_cand==1&demfemale==1|treatment==1&matt_gop_cand==1&demfemale==1
tukeyhsd matt_dem_cand if treatment==1&matt_dem_cand==1&demfemale==1|treatment==1&matt_gop_cand==1&demfemale==1
anova post_vote matt_dem_cand if treatment==1&matt_dem_cand==1&demmale==1|treatment==1&matt_gop_cand==1&demmale==1
tukeyhsd matt_dem_cand if treatment==1&matt_dem_cand==1&demmale==1|treatment==1&matt_gop_cand==1&demmale==1
anova post_vote matt_dem_cand if treatment==1&matt_dem_cand==1&gopfemale==1|treatment==1&matt_gop_cand==1&gopfemale==1
tukeyhsd matt_dem_cand if treatment==1&matt_dem_cand==1&gopfemale==1|treatment==1&matt_gop_cand==1&gopfemale==1
anova post_vote matt_dem_cand if treatment==1&matt_dem_cand==1&gopmale==1|treatment==1&matt_gop_cand==1&gopmale==1
tukeyhsd matt_dem_cand if treatment==1&matt_dem_cand==1&gopmale==1|treatment==1&matt_gop_cand==1&gopmale==1

gen matt_dem_cand_x_gopmale=gopmale*matt_dem_cand
reg post_vote matt_dem_cand gopmale matt_dem_cand_x_gopmale if treatment==1&matt_dem_cand==1&gopmale==1|treatment==1&matt_gop_cand==1&gopmale==1|treatment==1&matt_dem_cand==1&demfemale==1|treatment==1&matt_gop_cand==1&demfemale==1
reg post_vote matt_dem_cand gopmale matt_dem_cand_x_gopmale if treatment==1&matt_dem_cand==1&gopmale==1|treatment==1&matt_gop_cand==1&gopmale==1|treatment==1&matt_dem_cand==1&gopfemale==1|treatment==1&matt_gop_cand==1&gopfemale==1
reg post_vote matt_dem_cand gopmale matt_dem_cand_x_gopmale if treatment==1&matt_dem_cand==1&gopmale==1|treatment==1&matt_gop_cand==1&gopmale==1|treatment==1&matt_dem_cand==1&demmale==1|treatment==1&matt_gop_cand==1&demmale==1

reg post_vote matt_dem_cand demfemale matt_dem_cand_x_demfemale if treatment==1&matt_dem_cand==1&demfemale==1|treatment==1&matt_gop_cand==1&demfemale==1|treatment==1&matt_dem_cand==1&gopfemale==1|treatment==1&matt_gop_cand==1&gopfemale==1
reg post_vote matt_dem_cand gopfemale matt_dem_cand_x_gopfemale if treatment==1&matt_dem_cand==1&gopfemale==1|treatment==1&matt_gop_cand==1&gopfemale==1|treatment==1&matt_dem_cand==1&demmale==1|treatment==1&matt_gop_cand==1&demmale==1

reg post_vote matt_dem_cand demfemale matt_dem_cand_x_demfemale if treatment==1&matt_dem_cand==1&demfemale==1|treatment==1&matt_gop_cand==1&demfemale==1|treatment==1&matt_dem_cand==1&demmale==1|treatment==1&matt_gop_cand==1&demmale==1

*Experiment 2, no party candidate condition, control group
mean post_vote if matt_noparty_cand==1&demfemale==1&control==1
mean post_vote if matt_noparty_cand==1&demmale==1&control==1
mean post_vote if matt_noparty_cand==1&gopfemale==1&control==1
mean post_vote if matt_noparty_cand==1&gopmale==1&control==1

mean post_vote if samepartycand==1&demfemale==1&control==1
mean post_vote if samepartycand==1&demmale==1&control==1
mean post_vote if samepartycand==1&gopfemale==1&control==1
mean post_vote if samepartycand==1&gopmale==1&control==1

mean post_vote if samepartycand==0&demfemale==1&control==1
mean post_vote if samepartycand==0&demmale==1&control==1
mean post_vote if samepartycand==0&gopfemale==1&control==1
mean post_vote if samepartycand==0&gopmale==1&control==1

anova post_vote matt_noparty_cand if matt_noparty_cand==1&demfemale==1&control==1|samepartycand==1&demfemale==1&control==1
tukeyhsd matt_noparty if matt_noparty_cand==1&demfemale==1&control==1|samepartycand==1&demfemale==1&control==1
anova post_vote matt_noparty_cand if matt_noparty_cand==1&demmale==1&control==1|samepartycand==1&demmale==1&control==1
tukeyhsd matt_noparty if matt_noparty_cand==1&demmale==1&control==1|samepartycand==1&demmale==1&control==1
anova post_vote matt_noparty_cand if matt_noparty_cand==1&gopfemale==1&control==1|samepartycand==1&gopfemale==1&control==1
tukeyhsd matt_noparty_cand if matt_noparty_cand==1&gopfemale==1&control==1|samepartycand==1&gopfemale==1&control==1
anova post_vote matt_noparty_cand if matt_noparty_cand==1&gopmale==1&control==1|samepartycand==1&gopmale==1&control==1
tukeyhsd matt_noparty_cand if matt_noparty_cand==1&gopmale==1&control==1|samepartycand==1&gopmale==1&control==1

anova post_vote matt_noparty_cand if matt_noparty_cand==1&demfemale==1&control==1|samepartycand==0&demfemale==1&control==1
tukeyhsd matt_noparty if matt_noparty_cand==1&demfemale==1&control==1|samepartycand==0&demfemale==1&control==1
anova post_vote matt_noparty_cand if matt_noparty_cand==1&demmale==1&control==1|samepartycand==0&demmale==1&control==1
tukeyhsd matt_noparty if matt_noparty_cand==1&demmale==1&control==1|samepartycand==0&demmale==1&control==1
anova post_vote matt_noparty_cand if matt_noparty_cand==1&gopfemale==1&control==1|samepartycand==0&gopfemale==1&control==1
tukeyhsd matt_noparty_cand if matt_noparty_cand==1&gopfemale==1&control==1|samepartycand==0&gopfemale==1&control==1
anova post_vote matt_noparty_cand if matt_noparty_cand==1&gopmale==1&control==1|samepartycand==0&gopmale==1&control==1
tukeyhsd matt_noparty_cand if matt_noparty_cand==1&gopmale==1&control==1|samepartycand==0&gopmale==1&control==1

*feeling thermometer, same party candidate, harassment vs. control, experiment 2
mean post_therm if samepartycand==1&treatment==1&demfemale==1
mean post_therm if samepartycand==1&control==1&demfemale==1
mean post_therm if samepartycand==1&treatment==1&demmale==1
mean post_therm if samepartycand==1&control==1&demmale==1
mean post_therm if samepartycand==1&treatment==1&gopfemale==1
mean post_therm if samepartycand==1&control==1&gopfemale==1
mean post_therm if samepartycand==1&treatment==1&gopmale==1
mean post_therm if samepartycand==1&control==1&gopmale==1

anova post_therm treatment if samepartycand==1&treatment==1&demfemale==1|samepartycand==1&control==1&demfemale==1
tukeyhsd treatment if samepartycand==1&treatment==1&demfemale==1|samepartycand==1&control==1&demfemale==1
anova post_therm treatment if samepartycand==1&treatment==1&demmale==1|samepartycand==1&control==1&demmale==1
tukeyhsd treatment if samepartycand==1&treatment==1&demmale==1|samepartycand==1&control==1&demmale==1
anova post_therm treatment if samepartycand==1&treatment==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1
tukeyhsd treatment if samepartycand==1&treatment==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1
anova post_therm treatment if samepartycand==1&treatment==1&gopmale==1|samepartycand==1&control==1&gopmale==1
tukeyhsd treatment if samepartycand==1&treatment==1&gopmale==1|samepartycand==1&control==1&gopmale==1

reg post_therm treatment gopmale treat_x_gopmale if samepartycand==1&treatment==1&demfemale==1|samepartycand==1&control==1&demfemale==1|samepartycand==1&treatment==1&gopmale==1|samepartycand==1&control==1&gopmale==1
reg post_therm treatment gopmale treat_x_gopmale if samepartycand==1&treatment==1&demmale==1|samepartycand==1&control==1&demmale==1|samepartycand==1&treatment==1&gopmale==1|samepartycand==1&control==1&gopmale==1
reg post_therm treatment gopmale treat_x_gopmale if samepartycand==1&treatment==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1|samepartycand==1&treatment==1&gopmale==1|samepartycand==1&control==1&gopmale==1

reg post_therm treatment gopfemale treat_x_gopfemale if samepartycand==1&treatment==1&demfemale==1|samepartycand==1&control==1&demfemale==1|samepartycand==1&treatment==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1
reg post_therm treatment gopfemale treat_x_gopfemale if samepartycand==1&treatment==1&demmale==1|samepartycand==1&control==1&demmale==1|samepartycand==1&treatment==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1

reg post_therm treatment demmale treat_x_demmale if samepartycand==1&treatment==1&demfemale==1|samepartycand==1&control==1&demfemale==1|samepartycand==1&treatment==1&demmale==1|samepartycand==1&control==1&demmale==1


*feeling thermometer, opposite party candidate, harassment vs. control, experiment 2
mean post_therm if samepartycand==0&treatment==1&demfemale==1
mean post_therm if samepartycand==0&control==1&demfemale==1
mean post_therm if samepartycand==0&treatment==1&demmale==1
mean post_therm if samepartycand==0&control==1&demmale==1
mean post_therm if samepartycand==0&treatment==1&gopfemale==1
mean post_therm if samepartycand==0&control==1&gopfemale==1
mean post_therm if samepartycand==0&treatment==1&gopmale==1
mean post_therm if samepartycand==0&control==1&gopmale==1

anova post_therm treatment if samepartycand==0&treatment==1&demfemale==1|samepartycand==0&control==1&demfemale==1
tukeyhsd treatment if samepartycand==0&treatment==1&demfemale==1|samepartycand==0&control==1&demfemale==1
anova post_therm treatment if samepartycand==0&treatment==1&demmale==1|samepartycand==0&control==1&demmale==1
tukeyhsd treatment if samepartycand==0&treatment==1&demmale==1|samepartycand==0&control==1&demmale==1
anova post_therm treatment if samepartycand==0&treatment==1&gopfemale==1|samepartycand==0&control==1&gopfemale==1
tukeyhsd treatment if samepartycand==0&treatment==1&gopfemale==1|samepartycand==0&control==1&gopfemale==1
anova post_therm treatment if samepartycand==0&treatment==1&gopmale==1|samepartycand==0&control==1&gopmale==1
tukeyhsd treatment if samepartycand==0&treatment==1&gopmale==1|samepartycand==0&control==1&gopmale==1

reg post_therm treatment gopmale treat_x_gopmale if samepartycand==0&treatment==1&demfemale==1|samepartycand==0&control==1&demfemale==1|samepartycand==0&treatment==1&gopmale==1|samepartycand==0&control==1&gopmale==1
reg post_therm treatment gopmale treat_x_gopmale if samepartycand==0&treatment==1&demmale==1|samepartycand==0&control==1&demmale==1|samepartycand==0&treatment==1&gopmale==1|samepartycand==0&control==1&gopmale==1
reg post_therm treatment gopmale treat_x_gopmale if samepartycand==0&treatment==1&gopfemale==1|samepartycand==0&control==1&gopfemale==1|samepartycand==0&treatment==1&gopmale==1|samepartycand==0&control==1&gopmale==1

reg post_therm treatment gopfemale treat_x_gopfemale if samepartycand==0&treatment==1&demfemale==1|samepartycand==0&control==1&demfemale==1|samepartycand==0&treatment==1&gopfemale==1|samepartycand==0&control==1&gopfemale==1
reg post_therm treatment gopfemale treat_x_gopfemale if samepartycand==0&treatment==1&demmale==1|samepartycand==0&control==1&demmale==1|samepartycand==0&treatment==1&gopfemale==1|samepartycand==0&control==1&gopfemale==1

reg post_therm treatment demmale treat_x_demmale if samepartycand==0&treatment==1&demfemale==1|samepartycand==0&control==1&demfemale==1|samepartycand==0&treatment==1&demmale==1|samepartycand==0&control==1&demmale==1

*vote likelihood, same party placebo vs. same party harassment treatment by party-gendger group, experiment 2
mean post_vote if samepartycand==1&placebo==1&demfemale==1
mean post_vote if samepartycand==1&treatment==1&demfemale==1
mean post_vote if samepartycand==1&placebo==1&demmale==1
mean post_vote if samepartycand==1&treatment==1&demmale==1
mean post_vote if samepartycand==1&placebo==1&gopfemale==1
mean post_vote if samepartycand==1&treatment==1&gopfemale==1
mean post_vote if samepartycand==1&placebo==1&gopmale==1
mean post_vote if samepartycand==1&treatment==1&gopmale==1

anova post_vote placebo if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&treatment==1&demfemale==1
tukeyhsd placebo if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&treatment==1&demfemale==1
anova post_vote placebo if samepartycand==1&placebo==1&demmale==1|samepartycand==1&treatment==1&demmale==1
tukeyhsd placebo if samepartycand==1&placebo==1&demmale==1|samepartycand==1&treatment==1&demmale==1
anova post_vote placebo if samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&treatment==1&gopfemale==1
tukeyhsd placebo if samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&treatment==1&gopfemale==1
anova post_vote placebo if samepartycand==1&placebo==1&gopmale==1|samepartycand==1&treatment==1&gopmale==1
tukeyhsd placebo if samepartycand==1&placebo==1&gopmale==1|samepartycand==1&treatment==1&gopmale==1

gen placebo_x_gopmale=gopmale*placebo
gen placebo_x_gopfemale=gen placebo_x_gopfemale
gen placebo_x_demmale=placebo*demmale

reg post_vote placebo gopmale placebo_x_gopmale if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&treatment==1&demfemale==1|samepartycand==1&placebo==1&gopmale==1|samepartycand==1&treatment==1&gopmale==1
reg post_vote placebo gopmale placebo_x_gopmale if samepartycand==1&placebo==1&demmale==1|samepartycand==1&treatment==1&demmale==1|samepartycand==1&placebo==1&gopmale==1|samepartycand==1&treatment==1&gopmale==1
reg post_vote placebo gopmale placebo_x_gopmale if samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&treatment==1&gopfemale==1|samepartycand==1&placebo==1&gopmale==1|samepartycand==1&treatment==1&gopmale==1

reg post_vote placebo gopfemale placebo_x_gopfemale if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&treatment==1&demfemale==1|samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&treatment==1&gopfemale==1
reg post_vote placebo gopfemale placebo_x_gopfemale if samepartycand==1&placebo==1&demmale==1|samepartycand==1&treatment==1&demmale==1|samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&treatment==1&gopfemale==1

reg post_vote placebo demmale placebo_x_demmale if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&treatment==1&demfemale==1|samepartycand==1&placebo==1&demmale==1|samepartycand==1&treatment==1&demmale==1

*vote likelihood, same party placebo vs. same party CONTROL by party-gendger group, experiment 2
mean post_vote if samepartycand==1&placebo==1&demfemale==1
mean post_vote if samepartycand==1&control==1&demfemale==1
mean post_vote if samepartycand==1&placebo==1&demmale==1
mean post_vote if samepartycand==1&control==1&demmale==1
mean post_vote if samepartycand==1&placebo==1&gopfemale==1
mean post_vote if samepartycand==1&control==1&gopfemale==1
mean post_vote if samepartycand==1&placebo==1&gopmale==1
mean post_vote if samepartycand==1&control==1&gopmale==1

anova post_vote placebo if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&control==1&demfemale==1
tukeyhsd placebo if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&control==1&demfemale==1
anova post_vote placebo if samepartycand==1&placebo==1&demmale==1|samepartycand==1&control==1&demmale==1
tukeyhsd placebo if samepartycand==1&placebo==1&demmale==1|samepartycand==1&control==1&demmale==1
anova post_vote placebo if samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1
tukeyhsd placebo if samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1
anova post_vote placebo if samepartycand==1&placebo==1&gopmale==1|samepartycand==1&control==1&gopmale==1
tukeyhsd placebo if samepartycand==1&placebo==1&gopmale==1|samepartycand==1&control==1&gopmale==1

reg post_vote placebo gopmale placebo_x_gopmale if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&control==1&demfemale==1|samepartycand==1&placebo==1&gopmale==1|samepartycand==1&control==1&gopmale==1
reg post_vote placebo gopmale placebo_x_gopmale if samepartycand==1&placebo==1&demmale==1|samepartycand==1&control==1&demmale==1|samepartycand==1&placebo==1&gopmale==1|samepartycand==1&control==1&gopmale==1
reg post_vote placebo gopmale placebo_x_gopmale if samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1|samepartycand==1&placebo==1&gopmale==1|samepartycand==1&control==1&gopmale==1

reg post_vote placebo gopfemale placebo_x_gopfemale if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&control==1&demfemale==1|samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1
reg post_vote placebo gopfemale placebo_x_gopfemale if samepartycand==1&placebo==1&demmale==1|samepartycand==1&control==1&demmale==1|samepartycand==1&placebo==1&gopfemale==1|samepartycand==1&control==1&gopfemale==1

reg post_vote placebo demmale placebo_x_demmale if samepartycand==1&placebo==1&demfemale==1|samepartycand==1&control==1&demfemale==1|samepartycand==1&placebo==1&demmale==1|samepartycand==1&control==1&demmale==1



